import Vue from "vue";

export default Vue.extend({
    name: "Header",
    data() {
      return {
        userName: ''
      }
    },
    computed: {
      getUserName() {
        return this.$store.getters.userInfo.name;
      }
    },
    mounted() {

    },
    methods: {
      logout() {
        this.$store.dispatch('Logout').then(res => {
          if(res) {
            this.$message({
              message: '退出成功',
              type: 'success'
            });
            console.log(res);
          }
        });
      }
    }
  });